using System.ComponentModel.Composition.Hosting;

namespace WpfAdvControls.Component
{
    /// <summary>
    ///     Singletom CompositionContainer Accessor
    /// </summary>
    public class CompositionContainerAccessor
    {
        private static CompositionContainer container;

        public static CompositionContainer Container
        {
            get
            {
                if (container == null)
                {
                    container = new CompositionContainer();
                }
                return container;
            }
        }

        public static void SetContainer(CompositionContainer compositionContainer)
        {
            container = compositionContainer;
        }
    }
}